package com.hr.system;

public enum ApprovalStatusEnum {

    WAIT_APPROVAL(0, "待提交"),
    WAIT_LEADER_APPROVAL(1, "待领导审批"),
    WAIT_HR_APPROVAL(2, "待HR审批"),
    APPROVAL_SUCCESS(3, "审批通过"),
    ;

    private Integer status;
    private String statusName;

    ApprovalStatusEnum(Integer status, String statusName){
        this.status = status;
        this.statusName = statusName;
    }

    public static String getStatusNameByStatus(String status) {
        if(status == null || "".equals(status)){
            return null;
        }
        for(ApprovalStatusEnum e: ApprovalStatusEnum.values()){
            if(e.getStatus().equals(status)){
                return e.getStatusName();
            }
        }
        return null;
    }

    public Integer getStatus() {
        return this.status;
    }

    public String getStatusName() {
        return this.statusName;
    }

}
